package com.zsrt.java.day20161223.xww.demo01;
import java.util.Scanner;
import org.junit.Test;
public class Year {
	/**
	 * 判断是否是闰年
	 */
	@Test
	public void test01(){
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入一个年份");
		int year=sc.nextInt();
		boolean result=(year%400==0)||(year%4==0&&year%100!=0);
		sc.close();
		if(result){
			System.out.println("是闰年");
		}else{
			System.out.println("不是闰年");
		}
		
	}
	


}
